package com.yiqi.liebang.feature.mine.view.adapter;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.suozhang.framework.framework.AM;
import com.yiqi.liebang.R;
import com.yiqi.liebang.common.widget.RatingBar;
import com.yiqi.liebang.entity.bo.MenuBo;
import com.yiqi.liebang.entity.bo.QuestionBo;

import java.util.List;

public class OtherQuestionAdapter extends BaseQuickAdapter<QuestionBo,BaseViewHolder> {
    public OtherQuestionAdapter() {
        super(R.layout.item_other_question);
    }

    @Override
    protected void convert(BaseViewHolder helper, QuestionBo item) {
        helper.setText(R.id.tv_user_question_content, item.getQuizcontent())
                .setText(R.id.tv_user_question_help, item.getUserAccountFormMap()==null?"":"帮助过" + item.getUserAccountFormMap().getHelpNum() + "人")
                .setText(R.id.tv_user_question_time, item.getChargestate() == 0 ? "限时免费" : "一元查看")

        ;

        RatingBar ratingBar = helper.getView(R.id.rb_user_question_star);
        ratingBar.setStar(item.getUserAccountFormMap()==null?0f:item.getStartLevel());
    }
}
